class SwitchBackgroundData {
  SwitchBackgroundData({
    this.total,
    this.list,
  });

  SwitchBackgroundData.fromJson(dynamic json) {
    total = json['total'];
    if (json['list'] != null) {
      list = [];
      json['list'].forEach((v) {
        list?.add(SwitchAvatarDataList.fromJson(v));
      });
    }
  }
  int? total;
  List<SwitchAvatarDataList>? list;
  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['total'] = total;
    if (list != null) {
      map['list'] = list?.map((v) => v.toJson()).toList();
    }
    return map;
  }
}

class SwitchAvatarDataList {
  SwitchAvatarDataList({
    this.type,
    this.id,
    this.resource,
    this.updatedAt,
  });

  String? id;
  String? resource;
  String? type;
  String? updatedAt;

  SwitchAvatarDataList.fromJson(dynamic json) {
    id = json['id'];
    resource = json['resource'];
    type = json['type'];
    updatedAt = json['updatedAt'];
  }
  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['id'] = id;
    map['resource'] = resource;
    map['type'] = type;
    map['updatedAt'] = updatedAt;
    return map;
  }
}

class UserBgAvatarRep {
  UserBgAvatarRep.fromJson(dynamic json) {
    avatarList = (json['list'] as List?)?.map((e) => SwitchAvatarDataList.fromJson(e)).toList();
  }
  List<SwitchAvatarDataList>? avatarList;
}
